<?php
/**
 * @copyright  For copyright and license information, read the COPYING.txt file.
 * @link       /COPYING.txt
 * @license    Academic Free License (AFL 3.0)
 * @package     rwd_default
 */

/**
 * @see Mage_Catalog_Block_Product_New
 * @var Mage_Catalog_Block_Product_New $this
 */
?>
<?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
<h2 class="subtitle products"><?php echo $this->__('New Products') ?></h2>
<?php $_columnCount = $this->getColumnCount(); ?>
    <table class="products-grid">
    <?php $i = 0;
    foreach ($_products->getItems() as $_product): ?>
        <?php if ($i++ % $_columnCount == 0): ?>
        <tr>
        <?php endif ?>
            <td>
                <div class="product-wrapper">
                    <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->escapeHtml($_product->getName()) ?>" class="product-image">
                        <?php $_imgSize = 260; ?>
                        <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize($_imgSize); ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
                    </a>
                    <h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->escapeHtml($_product->getName()) ?>"><?php echo $this->escapeHtml($_product->getName()) ?></a></h3>
                    <?php echo $this->getPriceHtml($_product, true, '-new') ?>
                </div>
            </td>
        <?php if ($i % $_columnCount == 0 || $i == count($_products)): ?>
        <tr>
        <?php endif ?>
    <?php endforeach ?>
    </table>
<?php endif ?>
